package tsi.trabalho.truco;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class CriarOuBuscar extends Activity{

	String nome;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_criar_ou_buscar);

		Intent intent = getIntent();
		Bundle bundle = intent.getExtras();
		nome = bundle.getString("nome");
	}
	
	@Override
	protected void onStart() {
		super.onStart();
//		startService();
	}

	public void criar(View view){

		Intent intent = new Intent(this, Criar.class);
		intent.putExtra("key", true);
		intent.putExtra("nome", nome.toString());
		startActivity(intent);


	}

	public void buscar(View view){

		Intent intent = new Intent(this, Buscar.class);
		intent.putExtra("nome", nome.toString());
		startActivity(intent);


	}

	public void startService(){
		Intent it = new Intent("TRUCO_SERVICE");
		startService(it);
	}

	public void stopService(){
		Intent it = new Intent("TRUCO_SERVICE");
		stopService(it);

	}
}
